package test;

import actions.*;
import dao.inter.*;
import net.sf.json.JSONObject;
import com.opensymphony.xwork2.ActionProxy;
import dao.impl.DBUtil;

public class DBtest extends CMTest {
	public String bridgeType = "xiaSha";
	public String beginData = "2018-05-01";
	public String endData = "2018-05-10";
	public String sensor = "A,B";
	public String warning = "sic";


	public void testMaintowerDeformation() throws Exception {
		ActionProxy proxy = getActionProxy("/maintowerDeformation.php");
		MaintowerDeformationAction action = (MaintowerDeformationAction) proxy.getAction();
		MaintowerDeformation b = action.getMaintowerDeformation();
		JSONObject json_a = b.getJsonResultByDateAndSersors("true", "true", bridgeType, beginData, endData, "A,B");
		assertTrue(Boolean.parseBoolean(json_a.getString("status")));
		System.out.println(json_a.toString());

	}

	public void testDB() {
		logger.info(DBUtil.query("select * from user").toString());

	}
}
